package com.yang.controller;

import com.yang.serivce.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yangbo
 * @date 2019-09-11 9:34
 */
@RestController
public class DemoController {

    @Autowired
    private UserService userService;

    @GetMapping(value = "/actuator/health")
    public String health() {
        return "SUCCESS";
    }

    @GetMapping(value = "/sayHello")
    public String sayHello(String name) {
        return userService.sayHello(name);
    }
}
